
#import "Controller.h"

#include <sys/types.h>
#include <sys/time.h>

#include "ooglutil.h"
#include "graffiti.h"

void DisplayPickInfoPanel()
{
    [NXApp displayPickInfoPanel];
}

void readstdin(int theFD, void *data)
{
/*
    if(async_fnextc(stdin,0) != NODATA) {
	Input();
    }
*/

    /* Try this for n ow, async may not be necessary */
    Input();
}

@implementation Controller

- appDidInit:sender
{
    [theWindow setAvoidsActivation:YES];
    onlyverts = 0;
    Initialize();
    DPSAddFD(fileno(stdin), &readstdin, NULL, NX_BASETHRESHOLD);
    return self;
}

- displayPickInfoPanel
{
    return self;
}

- draw:sender
{
    NewLine();
    return self;
}

- undo:sender
{
    RemoveVertex();
    return self;
}

- verticiesOnly:sender
{
    onlyverts = [sender intValue];
    return self;
}

@end
